package com.example.llm.sgg.sgglangchain.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;

/**
 * 这种方式的 智能体 比较僵硬，无法动态的将用户的其他输入要求，比如 RAG 搜索时，传递到大模型：：这是个伪需求：用户的输入是文本，可以使用多个agent来实现
 */
@AiService(wiringMode = AiServiceWiringMode.EXPLICIT,
        chatModel = "openAiChatModel",
        chatMemoryProvider = "xiaozhiChatMemoryProvider",
        tools = {"appointmentTools"},
        contentRetriever = "contentRetrieverXiaozhi")
public interface XiaozhiAgent {

    @SystemMessage(fromResource = "prompt/xiaozhi-doctor.txt")
    String chat(@MemoryId Long memoryId, @UserMessage String message);

}